//动态添加路由
const modules = import.meta.glob('../views/*/*.vue')
export function mapMenu(navList) {
  //动态添加路由
  const routerList = []
  for (const key of navList) {
    routerList.push({
      path: `/${key.nUrl.split('/')[2]}`,
      name: `${key.nUrl.split('/')[2].toUpperCase()}`,
      component: modules[`..${key.nUrl}`]
    })
  }
  return routerList
}
